# the minimum version of CMake.
cmake_minimum_required(VERSION 3.5.0)
project(taglib)

set(NATIVERENDER_ROOT_PATH ${CMAKE_CURRENT_SOURCE_DIR})

if(DEFINED PACKAGE_FIND_FILE)
    include(${PACKAGE_FIND_FILE})
endif()

add_subdirectory(taglib)

include_directories(
        taglib/taglib
        taglib/taglib/toolkit
        taglib/taglib/asf
        taglib/taglib/mpeg
        taglib/taglib/ogg
        taglib/taglib/ogg/flac
        taglib/taglib/flac
        taglib/taglib/mp4
        taglib/taglib/ogg/vorbis
        taglib/taglib/ogg/opus
        taglib/taglib/mpeg/id3v2
        taglib/taglib/mpeg/id3v2/frames
        taglib/taglib/mpeg/id3v1
        taglib/taglib/ape
        taglib/taglib/wavpack
        taglib/taglib/riff
        taglib/taglib/riff/aiff
        taglib/taglib/riff/wav
        taglib/taglib/dsf
        taglib/taglib/dsdiff)

include_directories(${NATIVERENDER_ROOT_PATH}
                    ${NATIVERENDER_ROOT_PATH}/include)

add_library(${CMAKE_PROJECT_NAME} SHARED
napi_init.cpp
utils.cpp)

target_link_libraries(${CMAKE_PROJECT_NAME}
libace_napi.z.so
libohfileuri.so
libz.so
tag)